<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
	<title>Sales - Dessert House</title>
	<link rel="shortcut icon" type="image/x-icon" href="../css/images/favicon.ico" />
	<link rel="stylesheet" href="../css/style.css" type="text/css" media="all" />
	<link rel="stylesheet" href="../css/flexslider.css" type="text/css" media="all" />
	
	<script src="../js/jquery-1.8.0.min.js" type="text/javascript"></script>
	<!--[if lt IE 9]>
		<script src="js/modernizr.custom.js"></script>
	<![endif]-->
	<script src="../js/jquery.flexslider-min.js" type="text/javascript"></script>
	<script src="../js/functions.js" type="text/javascript"></script>
	<script language="Javascript" src="../Chart/FusionCharts.js"></script>
</head>
<jsp:useBean id="saleInfo"  scope="session" class="edu.nju.desserthouse.action.business.SaleInfoBean" />

<body>
	<!-- wrapper -->
	<div id="wrapper">
		<!-- header -->
		<div class="header">
			<!-- shell -->
			<div class="shell">
				<h1 id="logo"><a href="#">cafe</a></h1>
				<div class="testimonials">
					<div class="testimonials-slider flexslider">
						<ul class="slides">
							<li>
								<h4>"The best espresso in downtown!"</h4>
								<div class="rating">
									<a href="#" class="active"></a>
									<a href="#" class="active"></a>
									<a href="#" class="active"></a>
									<a href="#" class="active"></a>
									<a href="#" class="active"></a>
								</div>
								<p> - John Cooper, Gourmet</p>
								<div class="cl">&nbsp;</div>
							</li>
							<li>
								<h4>"Yummy cupcakes and donuts!"</h4>
								<div class="rating">
									<a href="#" class="active"></a>
									<a href="#" class="active"></a>
									<a href="#" class="active"></a>
									<a href="#"></a>
									<a href="#"></a>
								</div>
								<p> - Ann Doe, Teacher</p>
								<div class="cl">&nbsp;</div>
							</li>
							<li>
								<h4>"Had a real fun there!"</h4>
								<div class="rating">
									<a href="#" class="active"></a>
									<a href="#" class="active"></a>
									<a href="#" class="active"></a>
									<a href="#" class="active"></a>
									<a href="#"></a>
								</div>
								<p> - Lisa Doe, Lawyer</p>
								<div class="cl">&nbsp;</div>
							</li>
							<li>
								<h4>"Great atmosphere!"</h4>
								<div class="rating">
									<a href="#" class="active"></a>
									<a href="#" class="active"></a>
									<a href="#" class="active"></a>
									<a href="#" class="active"></a>
									<a href="#" class="active"></a>
								</div>
								<p> - Gordon Doe, Manager</p>
								<div class="cl">&nbsp;</div>
							</li>
							<li>
								<h4>"Tastes good!"</h4>
								<div class="rating">
									<a href="#" class="active"></a>
									<a href="#" class="active"></a>
									<a href="#" class="active"></a>
									<a href="#" class="active"></a>
									<a href="#"></a>
								</div>
								<p> - Orman Kent, Architect</p>
								<div class="cl">&nbsp;</div>
							</li>
						</ul>
					</div>
				</div>
				<!-- header-right -->
				<div class="header-right">
					<div class="subscribe">
						<a href="../user/login.jsp"><span></span>VIP Log in</a></div>
					<div class="socials">
						<a href="#" class="facebook-ico">facebook</a>
						<a href="#" class="twitter-ico">twitter</a>
					</div>
					<div class="cl">&nbsp;</div>
				</div>
				<div class="cl">&nbsp;</div>
				<!-- end of header -->
				<!-- navigation -->
				<nav id="navigation">
					<ul>
						<li><a href="../home/home.html">Homepage</a></li>
						<li><a href="../vipcardstatistics.manager">VIP Cards</a></li>
						<li><a href="../vipstatistics.manager">VIP</a></li>
						<li><a href="../salestatistics.manager">Sales</a></li>
						<li><a href="../bestseller.manager">Best Seller</a></li>
						<li><a href="../news.manager">VIP News</a></li>
						<li><a href="../manager/clerkwelcome.jsp">Return</a></li>
					</ul>
				</nav>
				<!-- end of navigation -->
				<!-- slider-holder -->
				<div class="slider-holder">
					<span class="left"></span>
					<span class="right"></span>
					<!-- flexslider -->
					<div class="big-slider">
						<ul class="slides">
						<br>
						<br>
						<li>
        					<table width=900>
    							<tr>
    								<td>
					        			<div id="chartdiv1" align="center">Chart Container Doughnut 3D</div>
					        			<%String sale = "<graph showLegend='1' formatNumberScale='0' bgAlpha='0' canvasBgAlpha='0'>";
					        			sale = sale.concat("<set name='Ordered Online' value=\'"+saleInfo.getSaleNum(0)+"\' />");
					        			for(int i = 1; i < saleInfo.getShopNum(); i++){
											if(saleInfo.getSaleNum(i) != 0)
												sale = sale.concat("<set name='Shop "+i+"' value=\'"+saleInfo.getSaleNum(i)+"\' />");
										}
										sale = sale.concat("</graph>");%>
										<script type="text/javascript">
											var myChart1 = new FusionCharts("../Chart/Doughnut2D.swf", "myChart1", "420", "300", "0", "0");
											myChart1.setDataXML("<%=sale%>");
											myChart1.render("chartdiv1");
										</script>
									</td>
								</tr>
							</table>
						</li>
						<li>
        					<table width=900>
    							<tr>
    								<td>
					        			<div id="chartdiv2" align="center">Chart Container Column 3D</div>
					        			<%String income = "<graph showLegend='1' formatNumberScale='0' decimalPrecision='2' numberPrefix='$' bgAlpha='0' canvasBgAlpha='0' xAxisName='Shop' yAxisName='Income' showNames='1' showValues='1' plotFillAlpha='95' rotateYAxisName='0'>";
					        			income = income.concat("<set name='Ordered Online' value=\'"+Double.parseDouble(new java.text.DecimalFormat("0.00").format(saleInfo.getSaleIncome(0)))+"\' />");
					        			for(int j = 1; j < saleInfo.getShopNum(); j++){
											if(saleInfo.getSaleIncome(j) != 0)
												income = income.concat("<set name='Shop "+j+"' value=\'"+Double.parseDouble(new java.text.DecimalFormat("0.00").format(saleInfo.getSaleIncome(j)))+"\' />");
										}
					        			income = income.concat("</graph>");%>
										<script type="text/javascript">
											var myChart2 = new FusionCharts("../Chart/Column3D.swf", "myChart2", "600", "300", "0", "0");
											myChart2.setDataXML("<%=income%>");
											myChart2.render("chartdiv2");
										</script>
									</td>
								</tr>
							</table>
						</li>
						<li>
							<table width=900>
								<tr>
     								<td><h1><font color="yellow">Up To Now, We Have Sold <%=saleInfo.getTotalSale() %> Products</font></h1><br>
    							</tr>
    							<tr>
     								<td><h1><font color="yellow">And Our Total Income Is: $ <%=Double.parseDouble(new java.text.DecimalFormat("0.00").format(saleInfo.getTotalIncome())) %></font></h1><br>
    							</tr>
	    						<tr>
    								<td><h2><font color="green">Ordered Online:</font></h2></td>
	    						</tr>
	    						<tr>
   									<td>
      									<table align="center" border="0">
											<br>
											<tr>
    	     									<td><h2><font color="yellow">&nbsp;&nbsp;&nbsp;&nbsp;Sale:</font></h2></td>
        	 									<td><h2><font color="red">&nbsp;&nbsp;&nbsp;&nbsp;<%=saleInfo.getSaleNum(0) %></font></h2></td>
 		    	     							<td><h2><font color="yellow">&nbsp;&nbsp;&nbsp;&nbsp;The Ratio:</font></h2></td>
    		    	  							<td><h2><font color="red">&nbsp;&nbsp;&nbsp;&nbsp;<%=Double.parseDouble(new java.text.DecimalFormat("0.00").format(saleInfo.getNumRatio(0))) %>%</font></h2></td>
		    		    					</tr>
		    		    					<tr>
    	     									<td><h2><font color="yellow">&nbsp;&nbsp;&nbsp;&nbsp;Income:</font></h2></td>
        	 									<td><h2><font color="red">&nbsp;&nbsp;&nbsp;&nbsp;$<%=Double.parseDouble(new java.text.DecimalFormat("0.00").format(saleInfo.getSaleIncome(0))) %></font></h2></td>
 		    	     							<td><h2><font color="yellow">&nbsp;&nbsp;&nbsp;&nbsp;The Ratio:</font></h2></td>
    		    	  							<td><h2><font color="red">&nbsp;&nbsp;&nbsp;&nbsp;<%=Double.parseDouble(new java.text.DecimalFormat("0.00").format(saleInfo.getIncomeRatio(0))) %>%</font></h2></td>
		    			    				</tr>
		    		    				</table>
	    			    			</td>
		    			    	</tr>
		    			    </table>
		    			</li>
		    			<%for(int i = 1; i < saleInfo.getShopNum(); i++){ %>
		    			<li>
							<table width=900>
								<tr>
     								<td><h1><font color="yellow">Up To Now, We Have Sold <%=saleInfo.getTotalSale() %> Products</font></h1><br>
    							</tr>
    							<tr>
     								<td><h1><font color="yellow">And Our Total Income Is: $ <%=Double.parseDouble(new java.text.DecimalFormat("0.00").format(saleInfo.getTotalIncome())) %></font></h1><br>
	    						</tr>
		    			    	<tr>
    								<td><h2><font color="green">Sold In Shop:</font></h2></td>
	    						</tr>
		    					<tr>
    								<td><h2><font color="green">Shop: <%=i %></font></h2></td>
	    						</tr>
		    					<tr>
   									<td>
      									<table align="center" border="0">
											<br>
											<tr>
         										<td><h2><font color="yellow">&nbsp;&nbsp;&nbsp;&nbsp;Sale:</font></h2></td>
         										<td><h2><font color="red">&nbsp;&nbsp;&nbsp;&nbsp;<%=saleInfo.getSaleNum(i) %></font></h2></td>
 		         								<td><h2><font color="yellow">&nbsp;&nbsp;&nbsp;&nbsp;The Ratio:</font></h2></td>
 		   		      							<td><h2><font color="red">&nbsp;&nbsp;&nbsp;&nbsp;<%=Double.parseDouble(new java.text.DecimalFormat("0.00").format(saleInfo.getNumRatio(i))) %>%</font></h2></td>
	    			    					</tr>
	    			    					<tr>
	         									<td><h2><font color="yellow">&nbsp;&nbsp;&nbsp;&nbsp;Income:</font></h2></td>
    	     									<td><h2><font color="red">&nbsp;&nbsp;&nbsp;&nbsp;$<%=Double.parseDouble(new java.text.DecimalFormat("0.00").format(saleInfo.getSaleIncome(i))) %></font></h2></td>
 			         							<td><h2><font color="yellow">&nbsp;&nbsp;&nbsp;&nbsp;The Ratio:</font></h2></td>
    			      							<td><h2><font color="red">&nbsp;&nbsp;&nbsp;&nbsp;<%=Double.parseDouble(new java.text.DecimalFormat("0.00").format(saleInfo.getIncomeRatio(i))) %>%</font></h2></td>
	    			    					</tr>
		    			    			</table>
		    		    			</td>
	    			    		</tr>
    	    				</table>
        				</li>
        				<%} %>
        			</ul>
        		</div>
				</div>
				<!-- end of slider -->
			</div>
			<!-- end of shell -->
		</div>
		<!-- end of header -->
		<!-- main -->
		<div class="main">
			<div class="shell">
				<!-- cols -->
				<section class="cols">
					<div class="col">
						<h3>Fantastic Donuts </h3>
						<img src="../css/images/cols-img.png" alt="" class="alignleft" />
						<div class="cnt">
							<p>Lorem ipsum dolor sit amet, con<br />sectetur adipiscing elit. Cras molestie condimentum conse am leom.</p>
							<a href="../goods/alldoughnuts.jsp" class="dot">All Donuts</a>
						</div>
					</div>
					<div class="col">
						<h3>Delicious Cupcakes</h3>
						<img src="../css/images/cols-img2.png" alt="" class="alignleft" />
						<div class="cnt">
							<p>Ipsum dolor sit amet, consectetur adipiscing elit. Cras molestie condimentum conse am leo libert.</p>
							<a href="../goods/allcakes.jsp" class="dot">All Cakes</a>
						</div>
					</div>
					<div class="col">
						<h3>Amazing Coffee</h3>
						<img src="../css/images/cols-img3.png" alt="" class="alignleft" />
						<div class="cnt">
							<p>Sit amet, consectetur adipiscing elit. Cras molestie condimentum conse am leo libero, samet dor.</p>
							<a href="../goods/alldrinks.jsp" class="dot">All Coffee</a>
						</div>
					</div>
					<div class="cl">&nbsp;</div>
				</section>
				<!-- end of cols -->
				<!-- content -->
				<div class="content">
					<h3>What's New</h3>
					<div class="entry">
						<div class="date">
							<strong>25<small>2012</small></strong>
							<em>APR</em>
						</div>
						
						<div class="cnt">
							<h4>News Title 1 Goes Right Here</h4>
							<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras molestie condimentum conse am leom. Aenean neque dolor, tristique eu fermentum quis, imperdiet tincidunt ligula. </p>
							<a href="#" class="dot">View More</a>
						</div>
					</div>
					<div class="entry">
						<div class="date">
							<strong>22<small>2012</small></strong>
							<em>APR</em>
						</div>
						<div class="cnt">
							<h4>News Title 1 Goes Right Here</h4>
							<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras molestie condimentum conse am leom. Aenean neque dolor, tristique eu fermentum quis, imperdiet tincidunt ligula. </p>
							<a href="#" class="dot">View More</a>
						</div>
					</div>
				</div>
				<!-- end of content -->
				<!-- sidebar -->
				<aside class="sidebar">
					<div class="widget">
						<div class="facebook-social">
							<img src="../css/images/facebook-img.png" alt="" />
						</div>
					</div>
				</aside>
				<!-- end of sidebar -->
				<div class="cl">&nbsp;</div>
			</div>
		</div>
		<!-- end of main -->
		<div id="footer-push"></div>
	</div>
	<!-- end of wrapper -->
	<div id="footer">
		<div class="shell">
			<div class="footer-nav">
				<ul>
					<li><a href="../home/home.html">Homepage</a></li>
					<li><a href="../vipcardstatistics.manager">VIP Cards</a></li>
					<li><a href="../vipstatistics.manager">VIP</a></li>
					<li><a href="../salestatistics.manager">Sales</a></li>
					<li><a href="../bestseller.manager">Best Seller</a></li>
					<li><a href="../news.manager">VIP News</a></li>
					<li><a href="../manager/clerkwelcome.jsp">Return</a></li>
				</ul>
			</div>
			<p class="copy">?Copyright 2012<span>|</span>Design by <a href="http://chocotemplates.com" target="_blank">ChocoTemplates.com</a></p>
		</div>
	</div>
</body>
</html>